{extend name="public/base"}

{block name="title"}
维修店审核
{/block}

{block name="style"}
{css href="/static/wechat/css/managementshop.css" /}
{/block}

{block name="body"}
<div class="pageControl orderDetails">
    <div class="msui_nav msui_navTop" style="border-bottom: 1px solid #cccccc;align-items: center;">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">维修店审核</h1>
    </div>
    <div class="weui-top">
        <!--切换审核状态-->
        <div class="msui_menu">
            <div class="msui_menu-mask">
                <ul class="msui_menu-bd js-menu">
                    <li class="msui_menu-li" data-audit-status="1"><a class="msui_tabMenu-active msui_menu-item fs06 cl-9999">待我审核</a></li>
                    <li class="msui_menu-li" data-audit-status="2"><a class="msui_menu-item fs06 cl-9999">待平台审核</a></li>
                    <li class="msui_menu-li" data-audit-status="4"><a class="msui_menu-item fs06 cl-9999">已通过 </a></li>
                    <li class="msui_menu-li" data-audit-status="3"><a class="msui_menu-item fs06 cl-9999">已拒绝</a></li>
                    <!-- 用于动画的层 -->
                    <div id="line" class="msui_menu-baseline"></div>
                </ul>
            </div>
        </div>

        <!--退款列表-->
        <ul class="g-ul-dplb mar_top havebortop">
        </ul>
    </div>

</div>
<!-- loading toast -->
<div id="loadingToast" style="display:none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast" style="opacity: 1; visibility: visible;">
        <i class="weui-loading weui-icon_toast"></i>
        <p class="weui-toast__content">加载中...</p>
    </div>
</div>
{/block}
{block name="javascript"}
<!--<script src="/static/wechat/js/managementshop.js?v={php}echo time(){/php}"></script>-->
<script>
    $(function () {
        $(".msui_menu-bd").css('width','100%')

        var _li_width = $('.msui_menu-bd').find('.msui_menu-li').width();
        $("#line").css('width', _li_width + 'px').css('left', 0);

        var obj = {
            'is_more' : true,
            'page' : 1,
            'url' : '{:url("repair_list")}',
            'status' : 1
        };

        $(".msui_menu-li").click(function () {
            var _this = $(this);
            obj.status = _this.data('audit-status');
            $(this).children().addClass('msui_tabMenu-active')
            $(this).siblings().children().removeClass('msui_tabMenu-active')
            obj.page = 1;
            get_coupon_list();
        });
        get_coupon_list();
        function get_coupon_list() {
            $('#loadingToast').fadeIn(100);
            obj.is_more = false;
            $.ajax({
                type : 'POST',
                url : obj.url,
                data : {
                    status : obj.status
                },
                dataType : 'json',
                success : function (msg) {
                    if (msg.code == 200) {
                        $('#loadingToast').fadeOut(100);
                        $(".havebortop").html(msg.tpl);
                    } else {
                        $.alert('数据获取失败!!');
                    }
                }
            });
        }
    });

</script>
{/block}